/**
 * Created by douxin on 15/4/16.
 */
$("a.app_name").click(function(){
    var title = $(this).text();
    // 设置app详情的title
    $("h4.modal-title#appDetail").text(title);
    // 设置app详情的内容
    $(".app-detail-content").html(
        '<table class="table table-striped" id="appDetail">' +
            '<>'
    );
    $("div.modal#appDetail").modal();
});

// 模态框显示后填充模态框内容
$("div.modal#appDetail").on("shown.bs.modal", function() {
    $(".app-detail-content").html(
        '<table class="table table-striped" id="appDetail">' +
            '<thead>' +
                '<tr>' +
                    '<td>文件</td>' +
                    '<td>大小</td>' +
                    '<td>更新时间</td>' +
                    '<td>操作</td>' +
                '</tr>' +
            '</thead>' +
            '<tbody>' +
                '<tr>' +
                    '<td>sample.txt</td>' +
                    '<td>1.5 kb</td>' +
                    '<td>2015-04-17 11:18:42</td>' +
                    '<td>' +
                        '<a href="#" style="color: inherit;"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>' +
                        '<a href="#" style="margin: 20px;color: inherit;"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>' +
                    '</td>' +
                '</tr>' +
            '</tbody>' +
        '</table>'
    );
}).on("hidden.bs.modal", function() {
    console.log("appDetail hidden");
});

